package io.renren.modules.jxgkphone.controller;


import io.renren.modules.jxgkphone.entity.SchoolAnnounce;
import io.renren.modules.jxgkphone.service.SchoolAnnounceService;
import io.renren.modules.jxgkphone.tempEntity.TempAnnounce;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/announce")
public class SchoolAnnounceController {
    @Autowired
    SchoolAnnounceService schoolAnnounceService;
    @RequestMapping("/SelectFew")
    public List<TempAnnounce> SelectSchoolAnnounce(Integer count){
        List<TempAnnounce> ta=schoolAnnounceService.SelectSchoolAnnounce(count);
        return ta;
    }
    @RequestMapping("/SelectAll")
    public List<TempAnnounce> SelectAllAnnounce(){
        List<TempAnnounce> ta=schoolAnnounceService.SelectAllAnnounce();
        return ta;
    }
    @RequestMapping("/{aid}/SelectContent")
    public List<SchoolAnnounce> SelectContent(@PathVariable("aid") String aid){
        List<SchoolAnnounce> sa=schoolAnnounceService.SelectContent(aid);
        return sa;
    }
}
